<?php
$T->loadTpl("./html/".$template."/".$qname.".html");
$T->SetTpl('cssjs','html/cssjs.inc'); 
$T->SetTpl('jsmodel','html/jsmodel.inc');     
  
$name=isset($_GET["name"])?$_GET["name"]:"";
$s_where="";
if(!empty($name)){
    $s_where=" and rolename like '%".$name."%'";
}
$T->Set("dname",$name);

if(!ckAdm()){
    $s_where=" and mech=".$_SESSION["school"]." ";
}
$T->SetBlock("list","select a.*,b.name,c.sch_name from sys_role a left join sys_dict b on a.depttype=b.id left join sys_school c on a.mech=c.id where 1=1 ".$s_where." order by id desc ");

$T->Set("template",$template);         
$T->clearNaN();       
$T->clearNoN();
$T->display();  